<?php

class Register extends Controller {

	function register()
	{
		parent::Controller();
	}
	
	function index()
	{
        $data['title'] = "Crawl Rankings - Register";
        $this->load->view('header', $data);
        
        if (!$this->session->userdata('logged_in'))
        {
            $this->load->helper(array('form', 'url'));
            
            $data['title'] = "Crawl Rankings";

            $this->load->view('header', $data);
            $this->load->view('register_form');
        }
        else
        {
            $data['username'] = $this->session->userdata('username');

            $this->load->view('logged_in', $data);
            $this->load->view('content', $data);
        }
        
        $this->load->view('footer');
        $this->output->enable_profiler(TRUE);
	}
    
    function new_user()
    {
        $this->load->library('form_validation');
        $this->simpleloginsecure->create('user@example.com', 'uS$rpass!');
    }
}

/* End of file register.php */
/* Location: ./system/application/controllers/register.php */